clear
use outpatients_all
append using inpatient_stays_all
gen c=1
sort year1 month patid
collapse (sum) c, by(year1 month patid)
drop c
gen c=1
sort year1 month
collapse (sum) c, by(year1 month)
outsheet using encounters_unique.csv, comma replace
desc

